package com.cmj.registermodule

import android.os.Bundle
import android.view.View
import android.widget.Toast

import com.alibaba.android.arouter.facade.annotation.Route
import com.cmj.basemodule.BaseActivity
import com.cmj.basemodule.Event.MessageEvent

import org.greenrobot.eventbus.EventBus

@Route(path = "/a/r")
class RegisterActivity : BaseActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val name = intent.getStringExtra("name")
        val color = intent.getStringExtra("color")
        Toast.makeText(this, "$name--$color", Toast.LENGTH_SHORT).show()
    }

    fun goMain(view: View) {
        EventBus.getDefault().post(MessageEvent("注册陈宫"))
        finish()
    }

    override fun getLayoutId(): Int {
        return R.layout.regis_activity_register
    }
}
